package com.learn.controller;

import com.learn.exception.ResourceNotFoundException;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author mpk
 * @since  2024/8/19 18:04:49
 */
@Controller
public class ExceptionController {

    @GetMapping("/exceptionTest")
    public void test() throws ResourceNotFoundException {
        throw new ResourceNotFoundException("test11111111");
    }

    @GetMapping("/exceptionTest1")
    @ResponseBody
    public void test1() throws ResourceNotFoundException {
        throw new ResourceNotFoundException("test22222222");
    }


}
